package com.talk.user.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MessageController {
    @ResponseBody
    @RequestMapping("talk")
    public String getMessage(@RequestParam(value = "sent") String sentence){
        if(sentence.length() % 2 == 0){
            return "这是句好话";
        }else{
            return "这是句坏话";
        }
    }
}
